#include "pch.h"
#include "EnemyShip.h"
#include "Player.h"
#include "SpaceRock.h"

dxroids::Player::Player()
   : score_(0)
   , lives_remaining_(3)
{
}

void dxroids::Player::AddToScore(EnemyShip const & _enemy)
{
   switch (_enemy.GetSize())
   {
   case EnemyShip::Size::Large:
      AddToScore(DXROIDS_SCORE_ENEMY_SHIP_LARGE);
      break;
   case EnemyShip::Size::Small:
      AddToScore(DXROIDS_SCORE_ENEMY_SHIP_SMALL);
      break;
   }
}

void dxroids::Player::AddToScore(SpaceRock const & _rock)
{
   switch (_rock.GetSize())
   {
   case SpaceRock::Size::Big:
      AddToScore(DXROIDS_SCORE_BIG_ROCK);
      break;
   case SpaceRock::Size::Medium:
      AddToScore(DXROIDS_SCORE_MEDIUM_ROCK);
      break;
   case SpaceRock::Size::Small:
      AddToScore(DXROIDS_SCORE_SMALL_ROCK);
      break;
   }
}